package com.iflyteck;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.session.config.annotation.web.http.EnableSpringHttpSession;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 默认情况下是自带的嵌入式容器，如果需要构建war文件并进行部署时
 * 修改启动类，继承SpringBootServletInitializer并重写configure方法
 * 打成war包放在tomcat中启动必须要这个类才行
 */
@SpringBootApplication
@EnableRedisHttpSession
public class SpringbootLoginApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SpringbootLoginApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(SpringbootLoginApplication.class, args);
    }

}
